#include"processBar.h"

#define GREEN "\033[0;32;32m"
#define NONE "\033[m"
#define YELLOW "\033[1;33m"
#define PURPLE "\033[0;35m"
#define BLUE "\033[0;32;34m"
const char* label="-\\|/";
void processbar()
{
    char buffer[NUM]={0};
    int cnt=0;
    while(cnt<=100)
    {
        buffer[cnt]=RIGHT;
        printf(GREEN"[%-101s]"NONE PURPLE"[%d%%]"NONE BLUE"[%c]\r"NONE,buffer,cnt,label[cnt%4]);
        buffer[cnt++]=BODY;
        fflush(stdout);
        usleep(30000);
    }
    printf("\n");
}
